﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using NUnit.Framework;

using ReferenceSwap;

namespace ReferenceSwap.Tests
{
    [TestFixture]
    public class ContentFileFixture
    {
        [Test]
        [ExpectedException(typeof(ArgumentException))]
        public void VerifyNullIncludeDataCheck()
        {
            new ContentFile(null);
        }

        [Test]
        [ExpectedException(typeof(ArgumentException))]
        public void VerifyEmptyIncludeDataCheck()
        {
            new ContentFile("");
        }

        [Test]
        public void TestCreateContentFileFromInclude()
        {
            string fileName = @"Sample\TestName.xml";
            string expectedName = "Test Name";
            var expectedType = FileReferenceType.Content;
            var target = new ContentFile(@"Sample\TestName.xml");

            Assert.AreEqual(fileName, target.Path);
            Assert.AreEqual(expectedName, target.Name);
            Assert.AreEqual(expectedType, target.Type);
        }

    }
}
